function getPages (page,pageCount,pagesLength) {
	var pages = [page];
	var left = page - 1;
	var right = page + 1;
	var minNum = Math.min(pageCount,pagesLength);
	while (pages.length < minNum) {
		if (left > 0) {
			pages.unshift(left);
			left --;
		}
		if (right <= pageCount && pages.length < minNum) {
			pages.push(right);
			right ++;
		}
	}
	return pages;
}
// console.log(getPages(11,20,5))
module.exports.getPages = getPages;